package com.mentalhealthplatform.appModels;


import com.mentalhealthplatform.global.rbac.model.User;
import jakarta.persistence.Column;
import jakarta.persistence.DiscriminatorValue;
import jakarta.persistence.Entity;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Entity
@Getter
@Setter
@DiscriminatorValue("STUDENT")
public class Student extends User {
    // 学生特有字段
    @Column()
    private String address; // 地址
    @Column()
    private Date birthDate;
    @Column()
    private String name; // 姓名
    @Column(unique = true)
    private String number; // 学号
    @Column()
    private String gender; // 性别
    @Column()
    private String major; // 学生的专业
    @Column()
    private String grade; // 学生所在的年级
    @Column()
    private String college;// 学生所在的学院


    // Add these methods
    public String getUserType() {
        return "STUDENT";
    }

    public void setUserType(String userType) {
        // This method can be left empty or used to set a specific user type if needed
    }

    public Student convertToEntity() {
        return this;
    }
}